package cn.good.yan.basics.t6.async.service.impl;

import cn.good.yan.basics.t6.async.service.AService;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * @author shengren.yan
 * @create 2022-12-20
 */
@Service
public class AServiceImpl implements AService {

    @Async
    @Override
    public void addAll() {
        try {
            //模拟新增数据
            Thread.sleep(4 * 1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("批量新增数据完成");
    }
}
